<?php
class Pageley_Domain_Attribute_RequiredDecorator extends Pageley_Domain_Attribute_Decorator {
    
    public function __construct($attribute) {
        $validators = new Pageley_Util_ArrayMap();
        $validators->add(new Pageley_Domain_Validator_Required());
        parent::__construct($attribute, $validators);
    }
    
    public function __toString() {
        return $this->getName() . "(required)";
    }
    
    public function isRequired() {
        return true;
    }
}